


#include "test_criteria.h"



using namespace std;
using namespace tenacitas;
using namespace tenacitas::time;
using namespace tenacitas::time::tests;


// // **************************************
// // t200075

// t200075::
// t200075 () :
//     tester::test("t200075", 
// 		 "Tests if  time::day_criteria::next_time works when the days "
// 		 "are 4, 7, 16, 21, and the first date is 2009.06.02") {}

// t200075::
// ~t200075() {}

// void 
// t200075::
// operator ( ) ( basic::ptr<tester::test_printer> print )
//     throw ( basic::fault ) {

//     ostringstream s;

//     time::simple_time_creator<time::date> stc;
    
//     time::day_criteria<time::date, time::simple_time_creator<time::date> >
// 	criteria ( stc ) ;


//     criteria.add ( time::day ( 4 ) ) ;
//     criteria.add ( time::day ( 7 ) ) ;
//     criteria.add ( time::day ( 16 ) ) ;
//     criteria.add ( time::day ( 22 ) ) ;

//     time::date first ( time::day ( 2 ), time::month::jun, 2009)  ;

//     s << "Initial value: " << first << "\n";

//     time::date t;
    

//     if ( criteria.next_time ( first, t ) ) {
	
// 	s << "Next date calculated: " << t << "\n";

// 	time::date aux  ( time::day ( 4 ), time::month::jun, 2009);

// 	s << "The date we want: " << aux << "\n";
	
// 	if ( t == aux ) {
// 	    s << "Next date correct! Date = " << t << "\n";
// 	    ( *print ) ( s.str( ) ) ;
// 	}
// 	else {
// 	    s << "Next date NOT correct! Date = " << t << "\n";
// 	    ( *print ) ( s.str( ) ) ;
// 	    throw ( create_fault ( date, 
// 				   date::error_processing_date) ) ;
// 	}
//     }
//     else {
// 	s << "No next date calculated, when it should have been" << "\n";
// 	( *print ) ( s.str( ) ) ;
// 	throw ( create_fault ( date, 
// 			       date::error_processing_date) ) ;
//     }
// }

// // **************************************
// // t200076

// t200076::
// t200076 () :
//     tester::test("t200076", 
// 		 "Tests if  time::day_criteria::next_time works when the days "
// 		 "are 4, 7, 16, 21, and the first date is 2009.06.05") {}

// t200076::
// ~t200076() {}

// void 
// t200076::
// operator ( ) ( basic::ptr<tester::test_printer> print )
//     throw ( basic::fault ) {

//     ostringstream s;

//         time::simple_time_creator<time::date> stc;
    
//     time::day_criteria<time::date, time::simple_time_creator<time::date> >
// 	criteria ( stc ) ;


    


//     criteria.add ( time::day ( 4 ) ) ;
//     criteria.add ( time::day ( 7 ) ) ;
//     criteria.add ( time::day ( 16 ) ) ;
//     criteria.add ( time::day ( 22 ) ) ;

//     time::date first ( time::day ( 5 ), time::month::jun, 2009)  ;

//     s << "Initial value: " << first << "\n";

//     time::date t  ;

//     if ( criteria.next_time ( first, t ) ) {
// 	s << "Next date calculated: " << t << "\n";

// 	time::date aux  ( time::day ( 7 ), time::month::jun, 2009);

// 	s << "The date we want: " << aux << "\n";
	
// 	if ( t == aux ) {
// 	    s << "Next date correct! Date = " << t << "\n";
// 	    ( *print ) ( s.str( ) ) ;
// 	}
// 	else {
// 	    s << "Next date NOT correct! Date = " << t << "\n";
// 	    ( *print ) ( s.str( ) ) ;
// 	    throw ( create_fault ( date, 
// 				   date::error_processing_date) ) ;
// 	}
//     }
//     else {
// 	s << "No next date calculated, when it should have been" << "\n";
// 	( *print ) ( s.str( ) ) ;
// 	throw ( create_fault ( date, 
// 			       date::error_processing_date) ) ;
//     }
// }

// // **************************************
// // t200077

// t200077::
// t200077 () :
//     tester::test("t200077", 
// 		 "Tests if  time::day_criteria::next_time works when the days "
// 		 "are 4, 7, 16, 21, and the first date is 2009.06.10") {}

// t200077::
// ~t200077() {}

// void 
// t200077::
// operator ( ) ( basic::ptr<tester::test_printer> print )
//     throw ( basic::fault ) {

//     ostringstream s;

//         time::simple_time_creator<time::date> stc;
    
//     time::day_criteria<time::date, time::simple_time_creator<time::date> >
// 	criteria ( stc ) ;





//     criteria.add ( time::day ( 4 ) ) ;
//     criteria.add ( time::day ( 7 ) ) ;
//     criteria.add ( time::day ( 16 ) ) ;
//     criteria.add ( time::day ( 22 ) ) ;

//     time::date first ( time::day ( 10 ), time::month::jun, 2009)  ;

//     s << "Initial value: " << first << "\n";

//     time::date t  ;

//     if ( criteria.next_time ( first, t ) ) {

// 	s << "Next date calculated: " << t << "\n";

// 	time::date aux  ( time::day ( 16 ), time::month::jun, 2009);

// 	s << "The date we want: " << aux << "\n";
	
// 	if ( t == aux ) {
// 	    s << "Next date correct! Date = " << t << "\n";
// 	    ( *print ) ( s.str( ) ) ;
// 	}
// 	else {
// 	    s << "Next date NOT correct! Date = " << t << "\n";
// 	    ( *print ) ( s.str( ) ) ;
// 	    throw ( create_fault ( date, 
// 				   date::error_processing_date) ) ;
// 	}
//     }
//     else {
// 	s << "No next date calculated, when it should have been" << "\n";
// 	( *print ) ( s.str( ) ) ;
// 	throw ( create_fault ( date, 
// 			       date::error_processing_date) ) ;
//     }
// }

// // **************************************
// // t200078

// t200078::
// t200078 () :
//     tester::test("t200078", 
// 		 "Tests if  time::day_criteria::next_time works when the days "
// 		 "are 4, 7, 16, 21, and the first date is 2009.06.19") {}

// t200078::
// ~t200078() {}

// void 
// t200078::
// operator ( ) ( basic::ptr<tester::test_printer> print )
//     throw ( basic::fault ) {

//     ostringstream s;

//         time::simple_time_creator<time::date> stc;
    
//     time::day_criteria<time::date, time::simple_time_creator<time::date> >
// 	criteria ( stc ) ;



//     criteria.add ( time::day ( 4 ) ) ;
//     criteria.add ( time::day ( 7 ) ) ;
//     criteria.add ( time::day ( 16 ) ) ;
//     criteria.add ( time::day ( 22 ) ) ;

//     time::date first ( time::day ( 19 ), time::month::jun, 2009)  ;

//     s << "Initial value: " << first << "\n";

//     time::date t  ;

//     if ( criteria.next_time ( first, t ) ) {
// 	s << "Next date calculated: " << t << "\n";

// 	time::date aux  ( time::day ( 22 ), time::month::jun, 2009);

// 	s << "The date we want: " << aux << "\n";
	
// 	if ( t == aux ) {
// 	    s << "Next date correct! Date = " << t << "\n";
// 	    ( *print ) ( s.str( ) ) ;
// 	}
// 	else {
// 	    s << "Next date NOT correct! Date = " << t << "\n";
// 	    ( *print ) ( s.str( ) ) ;
// 	    throw ( create_fault ( date, 
// 				   date::error_processing_date) ) ;
// 	}
//     }
//     else {
// 	s << "No next date calculated, when it should have been" << "\n";
// 	( *print ) ( s.str( ) ) ;
// 	throw ( create_fault ( date, 
// 			       date::error_processing_date) ) ;
//     }
// }

// // **************************************
// // t200079

// t200079::
// t200079 () :
//     tester::test("t200079", 
// 		 "Tests if  time::day_criteria::next_time works when the days "
// 		 "are 4, 7, 16, 21, and the first date is 2009.06.04") {}

// t200079::
// ~t200079() {}

// void 
// t200079::
// operator ( ) ( basic::ptr<tester::test_printer> print )
//     throw ( basic::fault ) {

//     ostringstream s;

//         time::simple_time_creator<time::date> stc;
    
//     time::day_criteria<time::date, time::simple_time_creator<time::date> >
// 	criteria ( stc ) ;



//     criteria.add ( time::day ( 4 ) ) ;
//     criteria.add ( time::day ( 7 ) ) ;
//     criteria.add ( time::day ( 16 ) ) ;
//     criteria.add ( time::day ( 22 ) ) ;

//     time::date first ( time::day ( 4 ), time::month::jun, 2009)  ;

//     s << "Initial value: " << first << "\n";

//     time::date t  ;

//     if ( criteria.next_time ( first, t ) ) {
// 	s << "Next date calculated: " << t << "\n";

// 	time::date aux  ( time::day ( 7 ), time::month::jun, 2009);

// 	s << "The date we want: " << aux << "\n";
	
// 	if ( t == aux ) {
// 	    s << "Next date correct! Date = " << t << "\n";
// 	    ( *print ) ( s.str( ) ) ;
// 	}
// 	else {
// 	    s << "Next date NOT correct! Date = " << t << "\n";
// 	    ( *print ) ( s.str( ) ) ;
// 	    throw ( create_fault ( date, 
// 				   date::error_processing_date) ) ;
// 	}
//     }
//     else {
// 	s << "No next date calculated, when it should have been" << "\n";
// 	( *print ) ( s.str( ) ) ;
// 	throw ( create_fault ( date, 
// 			       date::error_processing_date) ) ;
//     }
// }

// // **************************************
// // t200080

// t200080::
// t200080 () :
//     tester::test("t200080", 
// 		 "Tests if  time::day_criteria::next_time works when the days "
// 		 "are 4, 7, 16, 21, and the first date is 2009.06.07") {}

// t200080::
// ~t200080() {}

// void 
// t200080::
// operator ( ) ( basic::ptr<tester::test_printer> print )
//     throw ( basic::fault ) {

//     ostringstream s;

//         time::simple_time_creator<time::date> stc;
    
//     time::day_criteria<time::date, time::simple_time_creator<time::date> >
// 	criteria ( stc ) ;



//     criteria.add ( time::day ( 4 ) ) ;
//     criteria.add ( time::day ( 7 ) ) ;
//     criteria.add ( time::day ( 16 ) ) ;
//     criteria.add ( time::day ( 22 ) ) ;

//     time::date first ( time::day ( 7 ), time::month::jun, 2009)  ;

//     s << "Initial value: " << first << "\n";

//     time::date t  ;

//     if ( criteria.next_time ( first, t ) ) {
// 	s << "Next date calculated: " << t << "\n";

// 	time::date aux  ( time::day ( 16 ), time::month::jun, 2009);

// 	s << "The date we want: " << aux << "\n";
	
// 	if ( t == aux ) {
// 	    s << "Next date correct! Date = " << t << "\n";
// 	    ( *print ) ( s.str( ) ) ;
// 	}
// 	else {
// 	    s << "Next date NOT correct! Date = " << t << "\n";
// 	    ( *print ) ( s.str( ) ) ;
// 	    throw ( create_fault ( date, 
// 				   date::error_processing_date) ) ;
// 	}
//     }
//     else {
// 	s << "No next date calculated, when it should have been" << "\n";
// 	( *print ) ( s.str( ) ) ;
// 	throw ( create_fault ( date, 
// 			       date::error_processing_date) ) ;
//     }
// }

// // **************************************
// // t200081

// t200081::
// t200081 () :
//     tester::test("t200081", 
// 		 "Tests if  time::day_criteria::next_time works when the days "
// 		 "are 4, 7, 16, 21, and the first date is 2009.06.16") {}

// t200081::
// ~t200081() {}

// void 
// t200081::
// operator ( ) ( basic::ptr<tester::test_printer> print )
//     throw ( basic::fault ) {

//     ostringstream s;

//         time::simple_time_creator<time::date> stc;
    
//     time::day_criteria<time::date, time::simple_time_creator<time::date> >
// 	criteria ( stc ) ;



//     criteria.add ( time::day ( 4 ) ) ;
//     criteria.add ( time::day ( 7 ) ) ;
//     criteria.add ( time::day ( 16 ) ) ;
//     criteria.add ( time::day ( 22 ) ) ;

//     time::date first ( time::day ( 16 ), time::month::jun, 2009)  ;

//     s << "Initial value: " << first << "\n";

//     time::date t  ;

//     if ( criteria.next_time ( first, t ) ) {
// 	s << "Next date calculated: " << t << "\n";

// 	time::date aux  ( time::day ( 22 ), time::month::jun, 2009);

// 	s << "The date we want: " << aux << "\n";
	
// 	if ( t == aux ) {
// 	    s << "Next date correct! Date = " << t << "\n";
// 	    ( *print ) ( s.str( ) ) ;
// 	}
// 	else {
// 	    s << "Next date NOT correct! Date = " << t << "\n";
// 	    ( *print ) ( s.str( ) ) ;
// 	    throw ( create_fault ( date, 
// 				   date::error_processing_date) ) ;
// 	}
//     }
//     else {
// 	s << "No next date calculated, when it should have been" << "\n";
// 	( *print ) ( s.str( ) ) ;
// 	throw ( create_fault ( date, 
// 			       date::error_processing_date) ) ;
//     }
// }


// // **************************************
// // t200082

// t200082::
// t200082 () :
//     tester::test("t200082", 
// 		 "Tests if  time::day_criteria::next_time works when the days "
// 		 "are 4, 7, 16, 21, and the first date is 2009.06.22") {}

// t200082::
// ~t200082() {}

// void 
// t200082::
// operator ( ) ( basic::ptr<tester::test_printer> print )
//     throw ( basic::fault ) {

//     ostringstream s;

//         time::simple_time_creator<time::date> stc;
    
//     time::day_criteria<time::date, time::simple_time_creator<time::date> >
// 	criteria ( stc ) ;



//     criteria.add ( time::day ( 4 ) ) ;
//     criteria.add ( time::day ( 7 ) ) ;
//     criteria.add ( time::day ( 16 ) ) ;
//     criteria.add ( time::day ( 22 ) ) ;

//     time::date first ( time::day ( 22 ), time::month::jun, 2009)  ;

//     s << "Initial value: " << first << "\n";

//     time::date t  ;

//     if ( criteria.next_time ( first, t ) ) {
// 	s << "Next date calculated: " << t << ", ";

// 	s << "but there could be no next date to 2009.06.22!\n";

// 	( *print ) ( s.str( ) ) ;	

// 	throw ( create_fault ( date, 
// 			       date::error_processing_date) ) ;
//     }
//     else {
// 	s << "No next date calculated, and that is just what it should be!" << "\n";
// 	( *print ) ( s.str( ) ) ;
//     }
// }

// // **************************************
// // t200083

// t200083::
// t200083 () :
//     tester::test("t200083", 
// 		 "Tests if  time::day_criteria::next_time works when the days "
// 		 "are 4, 7, 16, 21, and the first date is 2009.06.28") {}

// t200083::
// ~t200083() {}

// void 
// t200083::
// operator ( ) ( basic::ptr<tester::test_printer> print )
//     throw ( basic::fault ) {

//     ostringstream s;

//     time::simple_time_creator<time::date> stc;
    
//     time::day_criteria<time::date, time::simple_time_creator<time::date> >
// 	criteria ( stc ) ;



//     criteria.add ( time::day ( 4 ) ) ;
//     criteria.add ( time::day ( 7 ) ) ;
//     criteria.add ( time::day ( 16 ) ) ;
//     criteria.add ( time::day ( 22 ) ) ;

//     time::date first ( time::day ( 28 ), time::month::jun, 2009)  ;

//     s << "Initial value: " << first << "\n";

//     time::date t  ;

//     if ( criteria.next_time ( first, t ) ) {
// 	s << "Next date calculated: " << t << ", ";

// 	s << "but there could be no next date to 2009.06.22!\n";

// 	( *print ) ( s.str( ) ) ;	

// 	throw ( create_fault ( date, 
// 			       date::error_processing_date) ) ;
//     }
//     else {
// 	s << "No next date calculated, and that is just what it should be!" << "\n";
// 	( *print ) ( s.str( ) ) ;
//     }
// }

